﻿using System;

namespace SharpStockLib.Data
{
    /// <summary>
    /// Implements IData and has a Symbol property, which is supposed to be the name or ticker of an instrument (e.g. AAPL).
    /// </summary>
    public class NamedData : IData
    {
        public NamedData(string symbol, double open, double high, double low, double close, int volume, DateTime date)
        {
            Symbol = symbol;
            Open = open;
            High = high;
            Low = low;
            Close = close;
            Volume = volume;
            Date = date;
        }

        public NamedData()
        {
        }

        public override string ToString()
        {
            return Symbol + ";" + Date + ";" + Open + ";" + High + ";" + Low + ";" + Close + ";" + Volume;
        }

        public string Symbol
        {
            get;
            set;
        }

        #region IData Members

        public double Open
        {
            get;
            set;
        }

        public double High
        {
            get;
            set;
        }

        public double Low
        {
            get;
            set;
        }

        public double Close
        {
            get;
            set;
        }

        public int Volume
        {
            get;
            set;
        }

        public DateTime Date
        {
            get;
            set;
        }

        #endregion
    }
}
